﻿using com.iot.core.annotation;
using com.iot.core.data;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;

namespace com.iot.ht.Controllers.htuser.data
{
    [Schema(Name ="用户Dto",Description ="")]
    public class HtUserDto : BaseQto
    {


        [Comment("账号")]
        [Schema(Name = "账号", Description = "")]
        [MaxLength(50)]
        public string Ename { get; set; } = "";


        [Comment("姓名")]
        [Schema(Name = "姓名", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(50)]
        public string Name { get; set; } = "";


        [Comment("修改密码")]
        [Schema(Name = "修改密码", Description = "")]
        public bool EditPwd { get; set; }


        [Comment("密码")]
        [Schema(Name = "密码", Description = "")]
        [MaxLength(50)]
        public string Pwd { get; set; } = "";


        [Comment("性别")]
        [Schema(Name = "性别", Description = "男、女")]
        [MaxLength(100)]
        public string Sex { get; set; } = "";


        [Comment("出生日期")]
        [Schema(Name = "出生日期", Description = "")]
        public DateTime Birthday { get; set; }


        [Comment("职务")]
        [Schema(Name = "职务", Description = "")]
        [MaxLength(50)]
        public string Zw { get; set; } = "";


        [Comment("邮箱")]
        [Schema(Name = "邮箱", Description = "")]
        [MaxLength(100)]
        public string Email { get; set; } = "";


        [Comment("手机号")]
        [Schema(Name = "手机号", Description = "")]
        [MaxLength(50)]
        public string Mobile { get; set; } = "";


        [Comment("住址")]
        [Schema(Name = "住址", Description = "")]
        [MaxLength(100)]
        public string Address { get; set; } = "";


        [Comment("备注")]
        [Schema(Name = "备注", Description = "")]
        public string Memo { get; set; } = "";


        [Comment("照片")]
        [Schema(Name = "照片", Description = "")]
        public string Url { get; set; } = "";


        [Comment("创建日期")]
        [Schema(Name = "创建日期", Description = "")]
        public DateTime CrtDt { get; set; }


        [Comment("创建人编号")]
        [Schema(Name = "创建人编号", Description = "")]
        public long CrtUid { get; set; }


        [Comment("所属机构")]
        [Schema(Name = "所属机构", Description = "")]
        public long CrtDid { get; set; }


        [Comment("修改日期")]
        [Schema(Name = "修改日期", Description = "")]
        public DateTime EdtDt { get; set; }


        [Comment("创建人编号")]
        [Schema(Name = "创建人编号", Description = "")]
        public string CrtUname { get; set; } = "";


        [Comment("所属机构")]
        [Schema(Name = "所属机构", Description = "")]
        public string CrtDname { get; set; } = "";


        [Comment("状态")]
        [Schema(Name = "状态", Description = "启用、停用")]
        [MaxLength(100)]
        public string State { get; set; } = "";


        [Comment("RoleList")]
        [Schema(Name = "RoleList", Description = "")]
        public List<IdNameDto> RoleList { get; set; } = new List<IdNameDto>();
        
    }
}
